<template>
	<div class="sumdetail">
		
		<div v-if="id==0">
			<div class="sum-title">
				<i class="sum-title-icon" @click="back"></i>
				<div>优惠券/详情页</div>
			</div>
		</div>
		
		<div v-else-if="id==3">
			<div class="sum-title">
				<i class="sum-title-icon" @click="back"></i>
				<div>总金额/详情页</div>
			</div>
		</div>
		
	</div>
</template>

<script>
	export default{
		data(){
			return{
				id: 0,
			}
		},
		methods:{
			back(){
				this.$router.go(-1);//返回上一层
			}
		},
		mounted() {
			console.log(this.$route.params.id)
			this.id = this.$route.params.id
		}
	}
</script>

<style>
	.sumdetail{
		width: 100%;
		min-width: 922px; 
		background-color: #ffffff;
	}
	.sum-title{
		display: flex;
		justify-content: space-between;
		align-items: center;
		height: 50px;
		padding: 0 20px;
		font-size: 14px;
	}
	.sum-title-icon{
		width: 20px;
		height: 20px;
		background: url(../assets/return.png);
	}
</style>
